package com.jzy.gulimall.cart.config;

import com.jzy.gulimall.cart.interceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author jzy
 * @date 2020/9/18 15:02
 */
@Configuration
public class CartWebConfig implements WebMvcConfigurer {

    //远程调用丢失请求头
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).excludePathPatterns("/mergeCart");
    }
}
